package pe.gob.onpe.ejb.id;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ParametroCedulaTipoEleccionId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class ParametroCedulaTipoEleccionId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -2827686996114811907L;
	private Long tipoEleccionId;
	private Long procesoElectoralId;
	private Long parametroId;

	// Constructors

	/** default constructor */
	public ParametroCedulaTipoEleccionId() {
	}

	/** full constructor */
	public ParametroCedulaTipoEleccionId(Long tipoEleccionId,
			Long procesoElectoralId, Long parametroId) {
		this.tipoEleccionId = tipoEleccionId;
		this.procesoElectoralId = procesoElectoralId;
		this.parametroId = parametroId;
	}

	// Property accessors

	@Column(name = "TIPO_ELECCION_ID", unique = false, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)
	public Long getTipoEleccionId() {
		return this.tipoEleccionId;
	}

	public void setTipoEleccionId(Long tipoEleccionId) {
		this.tipoEleccionId = tipoEleccionId;
	}

	@Column(name = "PROCESO_ELECTORAL_ID", unique = false, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)
	public Long getProcesoElectoralId() {
		return this.procesoElectoralId;
	}

	public void setProcesoElectoralId(Long procesoElectoralId) {
		this.procesoElectoralId = procesoElectoralId;
	}

	@Column(name = "PARAMETRO_ID", unique = false, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)
	public Long getParametroId() {
		return this.parametroId;
	}

	public void setParametroId(Long parametroId) {
		this.parametroId = parametroId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ParametroCedulaTipoEleccionId))
			return false;
		ParametroCedulaTipoEleccionId castOther = (ParametroCedulaTipoEleccionId) other;

		return ((this.getTipoEleccionId() == castOther.getTipoEleccionId()) || (this
				.getTipoEleccionId() != null
				&& castOther.getTipoEleccionId() != null && this
				.getTipoEleccionId().equals(castOther.getTipoEleccionId())))
				&& ((this.getProcesoElectoralId() == castOther
						.getProcesoElectoralId()) || (this
						.getProcesoElectoralId() != null
						&& castOther.getProcesoElectoralId() != null && this
						.getProcesoElectoralId().equals(
								castOther.getProcesoElectoralId())))
				&& ((this.getParametroId() == castOther.getParametroId()) || (this
						.getParametroId() != null
						&& castOther.getParametroId() != null && this
						.getParametroId().equals(castOther.getParametroId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getTipoEleccionId() == null ? 0 : this.getTipoEleccionId()
						.hashCode());
		result = 37
				* result
				+ (getProcesoElectoralId() == null ? 0 : this
						.getProcesoElectoralId().hashCode());
		result = 37
				* result
				+ (getParametroId() == null ? 0 : this.getParametroId()
						.hashCode());
		return result;
	}

}